package fr.cnam.ratpProject.client.activities.searchStation;

import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceTokenizer;
import com.google.gwt.place.shared.Prefix;

public class SearchStationPlace extends Place {

	private String name;
	
	private boolean classement = false;

    public SearchStationPlace(String token) {
        this.name = token;
    }
    public SearchStationPlace(String token,boolean cc) {
    	this(token);
    	setClassement(cc);
    }

    public String getName() {
        return name;
    }
	
	public boolean isClassement() {
		return classement;
	}
	public void setClassement(boolean classement) {
		this.classement = classement;
	}

	@Prefix("searchStationPlace")
	public static class SearchStationPlaceTokenizer implements PlaceTokenizer<SearchStationPlace> {

		@Override
		public SearchStationPlace getPlace(String token) {
			return new SearchStationPlace(token);
		}

		@Override
		public String getToken(SearchStationPlace place) {
			return place.getName();
		}

	}

}
